#ifndef MP4_TO_H264_H
#define MP4_TO_H264_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h> // For usleep
#include <mp4v2/mp4v2.h>
#include <pthread.h>
#include "rtsp_server.h"
#include <string.h> // For memcpy
#include <stdlib.h>
#include <sys/time.h> // For gettimeofday

int StreamMp4ToRtspWithMp4v2(const char* filename, volatile int* stop_flag);

int streaming_thread_func(void* arg);

int unpackMp4File(char *mp4FileName, char *videoFileName, char *audioFileName);

#endif